<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<style>
    h1{
        text-align: center;
    }


</style>
<body>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <h3 class="text-center">
                双人副本
            </h3>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-2 column">
        </div>
        <div class="col-md-8 column">
            <form class="form-horizontal" role="form">
                <div class="form-group">
                    <label  class="col-sm-3 control-label">主机的开始坐标 X:</label>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" id="x1" />
                    </div>

                    <label  class="col-sm-3 control-label">从机的开始坐标 X:</label>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" id="x2" />
                    </div>



                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label">主机的开始坐标 Y:</label>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" id="y1" />
                    </div>

                    <label  class="col-sm-3 control-label">从机的开始坐标 Y:</label>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" id="y2" />
                    </div>

                </div>

                <div class="form-group">
                    <label  class="col-sm-3 control-label">你的每次副本时长</label>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" id="time" />
                    </div>

                    <label  class="col-sm-3 control-label">刷取次数</label>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" id="count" />
                    </div>

                </div>


            </form>
            <div class="row clearfix">
                <div class="col-md-1 column">
                </div>
                <div class="col-md-1 column">
                </div>
                <div class="col-md-2 column">
                    <button type="button" onclick="start()" class="btn btn-default btn-success">开始运行</button>
                </div>
                <div class="col-md-2 column">
                    <button type="button" onclick="end00()" class="btn btn-default btn-warning">重新配置</button>
                </div>
                <div class="col-md-2 column">
                    <button type="button" onclick="end01()" class="btn btn-default btn-danger">强制结束</button>
                </div>

            </div>
        </div>
        <div class="col-md-2 column">
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-2 column">
        </div>
        <div class="col-md-8 column">
            <div id="myCarousel" class="carousel slide">
                <!-- 轮播（Carousel）指标 -->
                <ol class="carousel-indicators">
                    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                    <li data-target="#myCarousel" data-slide-to="1"></li>
                    <li data-target="#myCarousel" data-slide-to="2"></li>
                </ol>
                <!-- 轮播（Carousel）项目 -->
                <div class="carousel-inner">
                    <div class="item active">
                        <img src="img/01.png" alt="First slide">
                        <div class="carousel-caption"></div>
                    </div>
                    <div class="item">
                        <img src="img/02.png" alt="Second slide">
                        <div class="carousel-caption"></div>
                    </div>
                    <div class="item">
                        <img src="img/03.png" alt="Third slide">
                        <div class="carousel-caption"></div>
                    </div>
                </div>
                <!-- 轮播（Carousel）导航 -->
                <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
            <div class="col-md-2 column">
            </div>
        </div>




    </div>

</div>









</body>

<script>


    function end01() {

        var str=confirm("确认强制终止？该操作不可逆！")
        if(str){
            $.post("/end1",function (data) {
                if(data=="success"){

                }else{
                    alert("结束失败")
                }
            });
        }

    }



function end00() {

    var str = confirm("确定重启");
    if (str) {
        $.post("/end",function (data) {
            if(data=="success"){
                alert("重启成功");
            }else{
                alert("重启失败")
            }
        });
    }




}


    function start() {

        var x1=$("#x1").val();
        var y1=$("#y1").val();
        var x2=$("#x2").val();
        var y2=$("#y2").val();
        var time=$("#time").val();
        var count=$("#count").val();

        if(x1==""||x2==""||y1==""||y2==""||time==""||count==""){
            alert("填写信息不得为空");
        }else {
            var str=confirm("确定开始？");
            if(str){


                $.post("/getlocation2",{"x1":x1,"y1":y1,"x2":x2,"y2":y2,"time":time,"count":count},function (data) {

                    if(data!="error"){


                    }else{
                        alert("执行失败");
                    }

                });


            }
        }


    }

</script>


</html>